package org.oslog.webapp.web.common.listener;

import javax.servlet.ServletContextEvent;

import org.oslog.common.core.OSlogBeanFactory;
import org.springframework.web.context.ContextLoaderListener;
import org.springframework.web.context.support.WebApplicationContextUtils;

public final class OSlogContextLoaderListener extends ContextLoaderListener {
	@Override
	public void contextInitialized(ServletContextEvent event) {
		super.contextInitialized(event);
		OSlogBeanFactory.setBeanFactory(WebApplicationContextUtils
				.getRequiredWebApplicationContext(event.getServletContext()));
	}
}
